package com.cloud.code.牛客网;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

/**
 * HJ96 表示数字
 */
public class Test61 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            int n = scanner.nextInt();
            int[] nums = new int[n];

            for (int i = 0; i < n; i++) {
                nums[i] = scanner.nextInt();
            }


            List<Integer> list = new ArrayList<>();
            int count = 0;
            Arrays.sort(nums);
            for (int i = 0; i < n; i++) {
                if (list.contains(i)) {
                    continue;
                }
                for (int j = i; j < n; j++) {
                    if (list.contains(j)) {
                        continue;
                    }
                    if (nums[j] % nums[i] == 0) {
                        list.add(j);
                    }
                }
                count++;

            }
            System.out.println(count);


        }

    }
}
